// -*- C++ -*------------------------------------------------------------------
// $Id: Ligand.h,v 1.2 2007-10-26 14:55:16 biocomp Exp $
//
//  Class:             Ligand
//
//  Base Class(es):    -
//
//  Derived Class(es): -
//
//  Containing:        -
//
//  Author:            Silvio Tosatto, previous work: Marcus Pruemmer
//
//  Project Name:      Victor
//
//  Date:              02/02, previous work: 06/2000
//
//  Reviewed By:       <Name>
//
//  Description:       --
// 
//  ATTENTION:         This class is *NOT* finished yet.
//                     There are many methods which have only a head
//                     declaration and no code inside.
// ---------------------------------------------------------------------------


#ifndef _Ligand_H_
#define _Ligand_H_


// Includes:
#include <Bond.h>
#include <Polymer.h>
#include <Group.h>
#include <Visitor.h>
#include <AminoAcidCode.h>

// Global constants, typedefs, etc. (to avoid):

namespace Biopool {

class Ligand : public Group
{
public: 

  // CONSTRUCTORS/DESTRUCTOR:
  Ligand();
  Ligand(const Ligand& orig);
  virtual ~Ligand(); 
  virtual string getClassName() const
    { return "Ligand"; }

  // PREDICATES:
  bool isMetalCompound();
  bool isCommonMetal();

  virtual void save(Saver& s);  // data saver
 
  // MODIFIERS:
  void copy(const Ligand& orig);

  virtual void load(Loader& l);  // data loader

  // OPERATORS:
  Ligand& operator=(const Ligand& orig);
  virtual Atom& operator[](unsigned int n);
  virtual const Atom& operator[](unsigned int n) const;

protected:

private:

  // HELPERS:

  // ATTRIBUTES:
 
};

// ---------------------------------------------------------------------------
//                                    Ligand
// -----------------x-------------------x-------------------x-----------------

// PREDICATES:


inline void 
Ligand::save(Saver& s)
{
  s.saveLigand(*this);
}

// MODIFIERS:

inline void 
Ligand::load(Loader& l)
{
  l.loadLigand(*this);
  resetBoundaries();
}

// OPERATORS:

inline Atom& 
Ligand::operator[](unsigned int n)
{
    return Group::operator[](n);
}

inline const Atom& 
Ligand::operator[](unsigned int n) const
{
    return Group::operator[](n);
}


} // namespace
#endif //_Ligand_H_

